inherited fmRequestGPChange: TfmRequestGPChange
  Left = 465
  Top = 178
  Width = 1014
  Height = 752
  Caption = #1047#1072#1103#1074#1083#1077#1085#1080#1103' '#1085#1072' '#1080#1079#1084#1077#1085#1077#1085#1080#1077' '#1075#1088#1072#1092#1080#1082#1072' '#1087#1083#1072#1090#1077#1078#1077#1081
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 698
    Width = 1006
  end
  inherited Panel1: TPanel
    Width = 1006
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 836
    end
    inherited BitBtn2: TBitBtn
      Left = 924
    end
  end
  object ToolBar1: TToolBar [2]
    Left = 0
    Top = 45
    Width = 1006
    Height = 29
    ButtonWidth = 26
    Caption = 'ToolBar1'
    Images = DMInv.ilActive
    TabOrder = 2
    object tbAddR: TToolButton
      Left = 0
      Top = 2
      Hint = #1057#1086#1079#1076#1072#1090#1100' '#1079#1072#1103#1074#1082#1091
      Caption = 'tbAddR'
      Enabled = False
      ImageIndex = 28
      ParentShowHint = False
      ShowHint = True
      OnClick = tbAddRClick
    end
    object tbEditR: TToolButton
      Left = 26
      Top = 2
      Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1079#1072#1103#1074#1082#1091
      Caption = 'tbEditR'
      Enabled = False
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbEditRClick
    end
    object tbDelR: TToolButton
      Left = 52
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1079#1072#1103#1074#1082#1091
      Caption = 'tbDelR'
      Enabled = False
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbDelRClick
    end
    object ToolButton1: TToolButton
      Left = 78
      Top = 2
      Width = 8
      Caption = 'ToolButton1'
      ImageIndex = 30
      Style = tbsSeparator
    end
    object tbPrint: TToolButton
      Left = 86
      Top = 2
      Hint = #1055#1077#1095#1072#1090#1100' '#1079#1072#1103#1074#1082#1080
      Caption = 'tbPrint'
      ImageIndex = 11
      ParentShowHint = False
      ShowHint = True
      Visible = False
      OnClick = tbPrintClick
    end
    object bGridCust: TcxButton
      Tag = 12
      Left = 112
      Top = 2
      Width = 27
      Height = 22
      Hint = #1050#1086#1083#1086#1085#1082#1080' '#1090#1072#1073#1083#1080#1094#1099
      ParentShowHint = False
      ShowHint = True
      TabOrder = 0
      TabStop = False
      OnClick = bGridCustClick
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000120B0000120B00001000000000000000000000000000
        80000080000000808000800000008000800080800000C0C0C000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        33333FFFFFFFFFFFFFFF000000000000000088888888888888880FFFFFFFFFFF
        FFF08F3FF3FF3FF7FFF80F00F00F00F900F08F883883883788380FFFFFFFF9FF
        FFF08F3FF3FF37F3FFF80F00F00F09F000F08F883883873888380FFFFFFFF99F
        FFF08F3FF3FF3773FFF80F00F99909F000F08F883777873888380FFFF9FFF999
        FFF08F3FF7FF3777FFF80F00F99F00F000F08F88377388388838099FF9FFFFFF
        FFF0877FF7FFFFFFFFF809C9C999CCCCCCC087878777888888880979CCCCCCCC
        C77087F7888888888FF809090000000000008787888888888888399333333333
        3333377333333333333333333333333333333333333333333333}
      LookAndFeel.SkinName = 'Blue'
      NumGlyphs = 2
    end
    object ToolButton2: TToolButton
      Left = 139
      Top = 2
      Width = 8
      Caption = 'ToolButton2'
      ImageIndex = 12
      Style = tbsSeparator
    end
    object cbReqType: TcxComboBox
      Left = 147
      Top = 2
      Properties.Items.Strings = (
        #1042#1089#1077
        #1053#1077#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1085#1099#1077
        #1054#1090#1082#1072#1079#1099
        #1055#1086#1083#1086#1078#1080#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103
        #1054#1090#1088#1080#1094#1072#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103
        #1043#1088#1072#1092#1080#1082' '#1080#1079#1084#1077#1085#1077#1085)
      Properties.OnCloseUp = cbReqTypePropertiesCloseUp
      TabOrder = 3
      Text = #1042#1089#1077
      Width = 180
    end
    object ToolButton3: TToolButton
      Left = 327
      Top = 2
      Width = 8
      Caption = 'ToolButton3'
      ImageIndex = 13
      Style = tbsSeparator
    end
    object bOtkaz: TcxButton
      Tag = 12
      Left = 335
      Top = 2
      Width = 99
      Height = 22
      Hint = #1054#1090#1082#1072#1079
      Caption = #1054#1090#1082#1072#1079#1072#1090#1100
      ParentShowHint = False
      ShowHint = True
      TabOrder = 1
      TabStop = False
      Visible = False
      OnClick = bOtkazClick
      LookAndFeel.SkinName = 'Office2007Pink'
    end
    object bCreateSC: TcxButton
      Tag = 12
      Left = 434
      Top = 2
      Width = 131
      Height = 22
      Hint = #1057#1086#1079#1076#1072#1090#1100' '#1076#1086#1087'. '#1089#1086#1075#1083#1072#1096'.'
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1075#1088#1072#1092#1080#1082
      ParentShowHint = False
      ShowHint = True
      TabOrder = 2
      TabStop = False
      Visible = False
      OnClick = bCreateSCClick
      LookAndFeel.SkinName = 'Office2007Green'
    end
  end
  object dbgR: TcxGrid [3]
    Left = 0
    Top = 74
    Width = 1006
    Height = 447
    Align = alTop
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 3
    LookAndFeel.Kind = lfStandard
    object tvR: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.Insert.Visible = True
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = True
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      FilterBox.Position = fpTop
      OnCellDblClick = tvRCellDblClick
      DataController.DataSource = dlgDS
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skCount
          FieldName = 'RID'
          Column = tvRRID
        end>
      DataController.Summary.SummaryGroups = <>
      Filtering.ColumnFilteredItemsList = True
      OptionsBehavior.CellHints = True
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Editing = False
      OptionsView.CellEndEllipsis = True
      OptionsView.CellAutoHeight = True
      OptionsView.CellTextMaxLineCount = 1
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.GroupFooters = gfVisibleWhenExpanded
      OptionsView.HeaderEndEllipsis = True
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Header = DMInv.cxSiniyText
      object tvRRID: TcxGridDBColumn
        Caption = #8470
        DataBinding.FieldName = 'RID'
        Width = 20
      end
      object tvRFIO_POLUCH: TcxGridDBColumn
        Caption = #1055#1086#1083#1091#1095#1072#1090#1077#1083#1100' '#1091#1089#1083#1091#1075
        DataBinding.FieldName = 'FIO_POLUCH'
        Width = 47
      end
      object tvRFIO_DL: TcxGridDBColumn
        Caption = #1050#1090#1086' '#1087#1086#1076#1087#1080#1089#1072#1083
        DataBinding.FieldName = 'FIO_DL'
        Width = 36
      end
      object tvRRDATE: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1079#1072#1103#1074#1083#1077#1085#1080#1103
        DataBinding.FieldName = 'RDATE'
        Width = 43
      end
      object tvRRDATEGP: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1087#1083#1072#1090#1077#1078#1072
        DataBinding.FieldName = 'RDATEGP'
        Width = 36
      end
      object tvRRSUMMA: TcxGridDBColumn
        Caption = #1057#1091#1084#1084#1072
        DataBinding.FieldName = 'RSUMMA'
        Width = 20
      end
      object tvRSCID: TcxGridDBColumn
        Caption = #8470' '#1076#1086#1087'. '#1089#1086#1075#1083'.'
        DataBinding.FieldName = 'SCID'
        Width = 36
      end
      object tvRRNOTE: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090'.'
        DataBinding.FieldName = 'RNOTE'
        Width = 25
      end
      object tvRAUTOR: TcxGridDBColumn
        Caption = #1040#1074#1090#1086#1088
        DataBinding.FieldName = 'AUTOR'
        Width = 20
      end
      object tvRRTIMEENTER: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1089#1086#1079#1076'.'
        DataBinding.FieldName = 'RTIMEENTER'
        Width = 31
      end
      object tvREDITOR: TcxGridDBColumn
        Caption = #1056#1077#1076#1072#1082#1090#1086#1088
        DataBinding.FieldName = 'EDITOR'
        Width = 33
      end
      object tvRRTIMEEDIT: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1088#1077#1076#1072#1082#1090#1080#1088
        DataBinding.FieldName = 'RTIMEEDIT'
        Width = 51
      end
      object tvRRREZOLNOTE: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090' '#1082' '#1088#1077#1079'.'
        DataBinding.FieldName = 'RREZOLNOTE'
        Width = 57
      end
      object tvRSOST: TcxGridDBColumn
        Caption = #1057#1086#1089#1090#1086#1103#1085#1080#1077
        DataBinding.FieldName = 'SOST'
        Width = 45
      end
      object tvRREZOL: TcxGridDBColumn
        Caption = #1056#1077#1079#1086#1083#1102#1094#1080#1103
        DataBinding.FieldName = 'REZOL'
        Width = 50
      end
      object tvRSCAN1: TcxGridDBColumn
        Caption = #1050#1086#1087#1080#1103' '#1087#1077#1088#1074'.'
        DataBinding.FieldName = 'SCAN1'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.NullStyle = nssUnchecked
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Options.Editing = False
        Width = 59
      end
      object tvRSCAN2: TcxGridDBColumn
        Caption = #1050#1086#1087#1080#1103' '#1088#1077#1075'.'
        DataBinding.FieldName = 'SCAN2'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.NullStyle = nssUnchecked
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Options.Editing = False
        Width = 61
      end
    end
    object cxGridLevel2: TcxGridLevel
      GridView = tvR
    end
  end
  object cxGrid1: TcxGrid [4]
    Left = 0
    Top = 529
    Width = 1006
    Height = 169
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 4
    LookAndFeel.Kind = lfStandard
    object cxGridDBTableView1: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.Insert.Visible = True
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = True
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      FilterBox.Position = fpTop
      OnCellDblClick = tvRCellDblClick
      DataController.DataSource = dsRF
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Format = '#,###0'
          Kind = skSum
          FieldName = 'RGPCDSUMMA'
          Column = cxGridDBTableView1RGPCDSUMMA
        end>
      DataController.Summary.SummaryGroups = <>
      Filtering.ColumnFilteredItemsList = True
      OptionsBehavior.CellHints = True
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsCustomize.ColumnGrouping = False
      OptionsData.CancelOnExit = False
      OptionsData.Editing = False
      OptionsView.CellEndEllipsis = True
      OptionsView.CellAutoHeight = True
      OptionsView.CellTextMaxLineCount = 1
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      OptionsView.GroupFooters = gfVisibleWhenExpanded
      OptionsView.HeaderEndEllipsis = True
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Header = DMInv.cxSiniyText
      object cxGridDBTableView1RGPCDDATE: TcxGridDBColumn
        Caption = #1053#1086#1074#1072#1103' '#1076#1072#1090#1072
        DataBinding.FieldName = 'RGPCDDATE'
      end
      object cxGridDBTableView1RGPCDSUMMA: TcxGridDBColumn
        Caption = #1053#1086#1074#1072#1103' '#1057#1091#1084#1084#1072
        DataBinding.FieldName = 'RGPCDSUMMA'
      end
    end
    object cxGridLevel1: TcxGridLevel
      GridView = cxGridDBTableView1
    end
  end
  object cxSplitter1: TcxSplitter [5]
    Left = 0
    Top = 521
    Width = 1006
    Height = 8
    HotZoneClassName = 'TcxMediaPlayer9Style'
    AlignSplitter = salTop
    Control = dbgR
  end
  inherited dlgDS: TDataSource
    DataSet = qR
  end
  object qR: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT R.*,'
      
        'p4.plastname || '#39' '#39' || p4.pname|| '#39' '#39' || COALESCE(p4.ppatronymic' +
        ', '#39' '#39') AS fio_poluch,'
      
        'p5.plastname || '#39' '#39' || p5.pname|| '#39' '#39' || COALESCE(p5.ppatronymic' +
        ', '#39' '#39') AS fio_dl,'
      
        'p2.plastname || '#39' '#39' || p2.pname|| '#39' '#39' || COALESCE(p2.ppatronymic' +
        ', '#39' '#39') AS autor,'
      
        'p3.plastname || '#39' '#39' || p3.pname|| '#39' '#39' || COALESCE(p3.ppatronymic' +
        ', '#39' '#39') AS editor,'
      'TRIM(case'
      'WHEN (R.RSOST IS NULL) then '#39#1053#1077#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1085#1086#39
      'WHEN (R.RSOST = 0) then '#39#1054#1090#1082#1072#1079#39
      'WHEN (R.RSOST = 1) then '#39#1043#1088#1072#1092#1080#1082' '#1080#1079#1084#1077#1085#1077#1085#39
      'END) AS sost,'
      'TRIM(case'
      
        'WHEN ((COALESCE(R.RREZOL,0) = 0) AND (R.RREZOLNOTE IS NOT NULL))' +
        ' then '#39#1054#1090#1088#1080#1094#1072#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103#39
      
        'WHEN ((COALESCE(R.RREZOL,0) = 1) AND (R.RREZOLNOTE IS NOT NULL))' +
        ' then '#39#1055#1086#1083#1086#1078#1080#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103#39
      'END) AS rezol,'
      
        'IIF(RSO.RID IS NOT NULL, 1, 0) AS scan1, IIF(RSO1.RID IS NOT NUL' +
        'L, 1, 0) AS scan2'
      'FROM requestgpchange R'
      'LEFT OUTER JOIN USERS U2 ON U2.USNAME = R.RUSEREDIT'
      'LEFT OUTER JOIN PEOPLE P3 ON P3.PID = U2.PID'
      'LEFT OUTER JOIN USERS U3 ON U3.USNAME = R.RUSERENTER'
      'LEFT OUTER JOIN PEOPLE P2 ON P2.PID = U3.PID'
      'LEFT OUTER JOIN PEOPLE P4 ON P4.PID = R.PID_POLUCH'
      'LEFT OUTER JOIN PEOPLE P5 ON P5.PID = R.PID'
      
        'LEFT OUTER JOIN REQUEST_SCAN_GPC RSO ON RSO.RID = R.RID AND RSO.' +
        'RSTYPE = 1'
      
        'LEFT OUTER JOIN REQUEST_SCAN_GPC RSO1 ON RSO1.RID = R.RID AND RS' +
        'O1.RSTYPE = 2'
      'WHERE R.RISDELETE IS NULL')
    Left = 288
    object qRRID: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUESTGPCHANGE"."RID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qRPID_POLUCH: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"REQUESTGPCHANGE"."PID_POLUCH"'
    end
    object qRPID: TIntegerField
      FieldName = 'PID'
      Origin = '"REQUESTGPCHANGE"."PID"'
    end
    object qRRUSERENTER: TIBStringField
      FieldName = 'RUSERENTER'
      Origin = '"REQUESTGPCHANGE"."RUSERENTER"'
      Size = 40
    end
    object qRRTIMEENTER: TDateTimeField
      FieldName = 'RTIMEENTER'
      Origin = '"REQUESTGPCHANGE"."RTIMEENTER"'
    end
    object qRRUSEREDIT: TIBStringField
      FieldName = 'RUSEREDIT'
      Origin = '"REQUESTGPCHANGE"."RUSEREDIT"'
      Size = 40
    end
    object qRRTIMEEDIT: TDateTimeField
      FieldName = 'RTIMEEDIT'
      Origin = '"REQUESTGPCHANGE"."RTIMEEDIT"'
    end
    object qRRNOTE: TIBStringField
      FieldName = 'RNOTE'
      Origin = '"REQUESTGPCHANGE"."RNOTE"'
      Size = 255
    end
    object qRRDATE: TDateField
      FieldName = 'RDATE'
      Origin = '"REQUESTGPCHANGE"."RDATE"'
    end
    object qRRISDELETE: TIntegerField
      FieldName = 'RISDELETE'
      Origin = '"REQUESTGPCHANGE"."RISDELETE"'
    end
    object qRRSUMMA: TIBBCDField
      FieldName = 'RSUMMA'
      Origin = '"REQUESTGPCHANGE"."RSUMMA"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qRRREZOL: TIntegerField
      FieldName = 'RREZOL'
      Origin = '"REQUESTGPCHANGE"."RREZOL"'
    end
    object qRRSOST: TIntegerField
      FieldName = 'RSOST'
      Origin = '"REQUESTGPCHANGE"."RSOST"'
    end
    object qRRREZOLNOTE: TIBStringField
      FieldName = 'RREZOLNOTE'
      Origin = '"REQUESTGPCHANGE"."RREZOLNOTE"'
      Size = 255
    end
    object qRSCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"REQUESTGPCHANGE"."SCID"'
    end
    object qRRDATEGP: TDateField
      FieldName = 'RDATEGP'
      Origin = '"REQUESTGPCHANGE"."RDATEGP"'
    end
    object qRFIO_POLUCH: TIBStringField
      FieldName = 'FIO_POLUCH'
      ProviderFlags = []
      Size = 767
    end
    object qRFIO_DL: TIBStringField
      FieldName = 'FIO_DL'
      ProviderFlags = []
      Size = 767
    end
    object qRAUTOR: TIBStringField
      FieldName = 'AUTOR'
      ProviderFlags = []
      Size = 767
    end
    object qREDITOR: TIBStringField
      FieldName = 'EDITOR'
      ProviderFlags = []
      Size = 767
    end
    object qRSOST: TIBStringField
      FieldName = 'SOST'
      ProviderFlags = []
      Size = 14
    end
    object qRREZOL: TIBStringField
      FieldName = 'REZOL'
      ProviderFlags = []
      Size = 23
    end
    object qRSCAN1: TIntegerField
      FieldName = 'SCAN1'
      ProviderFlags = []
    end
    object qRSCAN2: TIntegerField
      FieldName = 'SCAN2'
      ProviderFlags = []
    end
  end
  object sqlOtkaz: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'UPDATE REQUESTGPCHANGE R SET R.RSOST = 0 WHERE R.RID = :RID')
    Transaction = DMInv.IBTransaction1
    Left = 328
  end
  object qRF: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT *'
      'from RGPC_DEF where rid = :rid')
    Left = 336
    Top = 184
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'rid'
        ParamType = ptUnknown
      end>
    object qRFRGPCDDATE: TDateField
      FieldName = 'RGPCDDATE'
      Origin = '"RGPC_DEF"."RGPCDDATE"'
    end
    object qRFRGPCDSUMMA: TIBBCDField
      FieldName = 'RGPCDSUMMA'
      Origin = '"RGPC_DEF"."RGPCDSUMMA"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
  end
  object dsRF: TDataSource
    DataSet = qRF
    Left = 304
    Top = 184
  end
  object sqlChangeGP: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'EXECUTE PROCEDURE SP_CHANGEGP (:RID)')
    Transaction = DMInv.IBTransaction1
    Left = 376
  end
  object qTmp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT R.*,'
      
        'p4.plastname || '#39' '#39' || p4.pname|| '#39' '#39' || COALESCE(p4.ppatronymic' +
        ', '#39' '#39') AS fio_poluch,'
      
        'p5.plastname || '#39' '#39' || p5.pname|| '#39' '#39' || COALESCE(p5.ppatronymic' +
        ', '#39' '#39') AS fio_dl,'
      
        'p2.plastname || '#39' '#39' || p2.pname|| '#39' '#39' || COALESCE(p2.ppatronymic' +
        ', '#39' '#39') AS autor,'
      
        'p3.plastname || '#39' '#39' || p3.pname|| '#39' '#39' || COALESCE(p3.ppatronymic' +
        ', '#39' '#39') AS editor,'
      'TRIM(case'
      'WHEN (R.RSOST IS NULL) then '#39#1053#1077#1088#1072#1089#1089#1084#1086#1090#1088#1077#1085#1085#1086#39
      'WHEN (R.RSOST = 0) then '#39#1054#1090#1082#1072#1079#39
      'WHEN (R.RSOST = 1) then '#39#1043#1088#1072#1092#1080#1082' '#1080#1079#1084#1077#1085#1077#1085#39
      'END) AS sost,'
      'TRIM(case'
      
        'WHEN ((COALESCE(R.RREZOL,0) = 0) AND (R.RREZOLNOTE IS NOT NULL))' +
        ' then '#39#1054#1090#1088#1080#1094#1072#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103#39
      
        'WHEN ((COALESCE(R.RREZOL,0) = 1) AND (R.RREZOLNOTE IS NOT NULL))' +
        ' then '#39#1055#1086#1083#1086#1078#1080#1090#1077#1083#1100#1085#1072#1103' '#1088#1077#1079#1086#1083#1102#1094#1080#1103#39
      'END) AS rezol,'
      
        'IIF(RSO.RID IS NOT NULL, 1, 0) AS scan1, IIF(RSO1.RID IS NOT NUL' +
        'L, 1, 0) AS scan2'
      'FROM requestgpchange R'
      'LEFT OUTER JOIN USERS U2 ON U2.USNAME = R.RUSEREDIT'
      'LEFT OUTER JOIN PEOPLE P3 ON P3.PID = U2.PID'
      'LEFT OUTER JOIN USERS U3 ON U3.USNAME = R.RUSERENTER'
      'LEFT OUTER JOIN PEOPLE P2 ON P2.PID = U3.PID'
      'LEFT OUTER JOIN PEOPLE P4 ON P4.PID = R.PID_POLUCH'
      'LEFT OUTER JOIN PEOPLE P5 ON P5.PID = R.PID'
      
        'LEFT OUTER JOIN REQUEST_SCAN_GPC RSO ON RSO.RID = R.RID AND RSO.' +
        'RSTYPE = 1'
      
        'LEFT OUTER JOIN REQUEST_SCAN_GPC RSO1 ON RSO1.RID = R.RID AND RS' +
        'O1.RSTYPE = 2'
      'WHERE R.RISDELETE IS NULL')
    Left = 288
    Top = 40
    object IntegerField1: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUESTGPCHANGE"."RID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object IntegerField2: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"REQUESTGPCHANGE"."PID_POLUCH"'
    end
    object IntegerField3: TIntegerField
      FieldName = 'PID'
      Origin = '"REQUESTGPCHANGE"."PID"'
    end
    object IBStringField1: TIBStringField
      FieldName = 'RUSERENTER'
      Origin = '"REQUESTGPCHANGE"."RUSERENTER"'
      Size = 40
    end
    object DateTimeField1: TDateTimeField
      FieldName = 'RTIMEENTER'
      Origin = '"REQUESTGPCHANGE"."RTIMEENTER"'
    end
    object IBStringField2: TIBStringField
      FieldName = 'RUSEREDIT'
      Origin = '"REQUESTGPCHANGE"."RUSEREDIT"'
      Size = 40
    end
    object DateTimeField2: TDateTimeField
      FieldName = 'RTIMEEDIT'
      Origin = '"REQUESTGPCHANGE"."RTIMEEDIT"'
    end
    object IBStringField3: TIBStringField
      FieldName = 'RNOTE'
      Origin = '"REQUESTGPCHANGE"."RNOTE"'
      Size = 255
    end
    object DateField1: TDateField
      FieldName = 'RDATE'
      Origin = '"REQUESTGPCHANGE"."RDATE"'
    end
    object IntegerField4: TIntegerField
      FieldName = 'RISDELETE'
      Origin = '"REQUESTGPCHANGE"."RISDELETE"'
    end
    object IBBCDField1: TIBBCDField
      FieldName = 'RSUMMA'
      Origin = '"REQUESTGPCHANGE"."RSUMMA"'
      Precision = 18
      Size = 2
    end
    object IntegerField5: TIntegerField
      FieldName = 'RREZOL'
      Origin = '"REQUESTGPCHANGE"."RREZOL"'
    end
    object IntegerField6: TIntegerField
      FieldName = 'RSOST'
      Origin = '"REQUESTGPCHANGE"."RSOST"'
    end
    object IBStringField4: TIBStringField
      FieldName = 'RREZOLNOTE'
      Origin = '"REQUESTGPCHANGE"."RREZOLNOTE"'
      Size = 255
    end
    object IntegerField7: TIntegerField
      FieldName = 'SCID'
      Origin = '"REQUESTGPCHANGE"."SCID"'
    end
    object DateField2: TDateField
      FieldName = 'RDATEGP'
      Origin = '"REQUESTGPCHANGE"."RDATEGP"'
    end
    object IBStringField5: TIBStringField
      FieldName = 'FIO_POLUCH'
      ProviderFlags = []
      Size = 767
    end
    object IBStringField6: TIBStringField
      FieldName = 'FIO_DL'
      ProviderFlags = []
      Size = 767
    end
    object IBStringField7: TIBStringField
      FieldName = 'AUTOR'
      ProviderFlags = []
      Size = 767
    end
    object IBStringField8: TIBStringField
      FieldName = 'EDITOR'
      ProviderFlags = []
      Size = 767
    end
    object IBStringField9: TIBStringField
      FieldName = 'SOST'
      ProviderFlags = []
      Size = 14
    end
    object IBStringField10: TIBStringField
      FieldName = 'REZOL'
      ProviderFlags = []
      Size = 23
    end
  end
  object frRequest: TfrxReport
    Version = '4.9.32'
    DotMatrixReport = False
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Default'
    PrintOptions.PrintOnSheet = 0
    ReportOptions.CreateDate = 40757.596164513900000000
    ReportOptions.LastChange = 40786.748924976860000000
    ScriptLanguage = 'PascalScript'
    StoreInDFM = False
    Left = 376
    Top = 168
  end
  object frDS_R: TfrxDBDataset
    UserName = 'R'
    CloseDataSource = False
    DataSet = qR
    BCDToCurrency = False
    Left = 408
    Top = 168
  end
  object frDS_RD: TfrxDBDataset
    UserName = 'RD'
    CloseDataSource = False
    DataSet = qRF
    BCDToCurrency = False
    Left = 408
    Top = 208
  end
  object frxPDFExport1: TfrxPDFExport
    UseFileCache = True
    ShowProgress = True
    OverwritePrompt = False
    PrintOptimized = False
    Outline = False
    Background = False
    HTMLTags = True
    Author = 'FastReport'
    Subject = 'FastReport PDF export'
    ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
    HideToolbar = False
    HideMenubar = False
    HideWindowUI = False
    FitWindow = False
    CenterWindow = False
    PrintScaling = False
    Left = 408
    Top = 248
  end
  object frxXLSExport1: TfrxXLSExport
    UseFileCache = True
    ShowProgress = True
    OverwritePrompt = False
    ExportEMF = True
    AsText = False
    Background = True
    FastExport = True
    PageBreaks = True
    EmptyLines = True
    SuppressPageHeadersFooters = False
    Left = 440
    Top = 248
  end
  object frxRichObject1: TfrxRichObject
    Left = 408
    Top = 288
  end
  object sqldelR: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      
        'update  REQUESTGPCHANGE RF set rf.risdelete = 1 where rf.rid = :' +
        'rid')
    Transaction = DMInv.IBTransaction1
    Left = 216
  end
end
